Harden CI roles: split infra plan/apply, fix registry#46
Conversation
IAM: - New javabin-ci-infra-plan role: ReadOnlyAccess + scoped writes for state locking, plan upload, Bedrock review, SSM read. Used by plan job. - Restrict javabin-ci-infra trust to refs/heads/main only (not PRs). Previously any PR could assume the full *:* infra role during plan. - Add SSM read (Google SA creds) to javabin-ci-registry role for hero sync. Platform CI: - Plan job now uses javabin-ci-infra-plan (read-only). - Apply job keeps javabin-ci-infra (write, main-only). Registry repo (via gh CLI): - Squash merge only, auto-merge enabled. - Required status check: "Validate Registration".
The role was created via CLI to bootstrap the plan job (chicken-and-egg: the plan job needs the role, but the role is created by the plan). Terraform will import it on first apply. Remove imports.tf after.
Terraform PlanChanges detected — review required. Plan output |
LLM Plan ReviewAWS CLI error: LLM returned no structured output. |
Terraform PlanChanges detected — review required. Plan output |
LLM Plan ReviewAWS CLI error: LLM returned no structured output. |
## Summary - Split `javabin-ci-infra` into read-only plan role and write-only apply role - Restrict apply role trust to `refs/heads/main` only (not PRs) - Add SSM read to registry role for hero sync Google credentials - Fix registry repo: squash-only merge, required "Validate Registration" status check ## Test plan - [ ] PR triggers plan job with `javabin-ci-infra-plan` (read-only) — plan succeeds - [ ] Push to main triggers apply job with `javabin-ci-infra` — apply succeeds - [ ] Registry hero sync can read SSM Google SA credentials - [ ] Registry PRs require "Validate Registration" to pass before merge
Summary
javabin-ci-infrainto read-only plan role and write-only apply rolerefs/heads/mainonly (not PRs)Test plan
javabin-ci-infra-plan(read-only) — plan succeedsjavabin-ci-infra— apply succeeds